<template>
  <div class="points-setting-container">
    <div class="points-header">
      <h1>积分设置</h1>
      <div class="header-actions">
        <button class="refresh-btn" @click="refreshData">
          刷新
        </button>
        <button class="new-btn" @click="openAddDialog">
          新增规则
        </button>
      </div>
    </div>
    
    <div class="points-content">
      <!-- 积分设置内容区域 -->
      <div class="empty-state">
        <div class="empty-icon">⚙️</div>
        <h3>积分设置功能开发中</h3>
        <p>此功能正在开发中，敬请期待...</p>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue';

// 刷新数据
const refreshData = () => {
  console.log('刷新积分设置数据');
  // TODO: 实现数据刷新逻辑
};

// 打开新增对话框
const openAddDialog = () => {
  console.log('打开新增积分规则对话框');
  // TODO: 实现新增对话框逻辑
};
</script>

<style scoped>
.points-setting-container {
  background-color: #1e2125;
  height: 100%;
  min-height: 100vh;
  color: white;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.points-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #2d3035;
  border-bottom: 1px solid #3d4045;
  padding: 16px 20px;
  flex-shrink: 0;
}

.points-header h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: white;
}

.header-actions {
  display: flex;
  gap: 12px;
}

.refresh-btn,
.new-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.refresh-btn {
  background-color: #3d4045;
  color: white;
}

.refresh-btn:hover {
  background-color: #4d5055;
}

.new-btn {
  background-color: #22c55e;
  color: white;
}

.new-btn:hover {
  background-color: #16a34a;
}

.points-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #b3b3b3;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.empty-state h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  color: white;
}

.empty-state p {
  margin: 0;
  font-size: 14px;
  color: #888;
}

/* 滚动条样式 */
.points-content::-webkit-scrollbar {
  width: 8px;
}

.points-content::-webkit-scrollbar-track {
  background: rgba(61, 64, 69, 0.5);
  border-radius: 4px;
}

.points-content::-webkit-scrollbar-thumb {
  background: rgba(34, 197, 94, 0.5);
  border-radius: 4px;
}

.points-content::-webkit-scrollbar-thumb:hover {
  background: rgba(34, 197, 94, 0.7);
}
</style>